<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>无权访问该页面</title>
    <style>
        .mainDiv {
            margin: 20px auto;
            text-align: center;
        }
        #spanSeconds {
            color:red;
            width:35px;
            height:35px;
            text-align: center;
            border:0px solid red;
        }
        h1 {
            color:red;
        }
        a {
            text-decoration: none;

        }
    </style>
</head>
<body>
    <div class="mainDiv">
        <h1>抱歉，您无权访问该页面，请先登录！</h1>
        <h3>系统会在<sapn id="spanSeconds"></sapn>秒后，自动返回<a href="/login.html">登录</a>页面！</h3>
    </div>
        <script>
        let num = 10;
        window.onload = function() {
           let sec = document.getElementById("spanSeconds");
           sec.innerText = num;
          setInterval(function(){
              num--;
              sec.innerText = num < 10 ? "0" + num : num;
              if (num == 0) {
                  location.href = "/login.html";
              }
          },1000);
        };
    </script>

</body>
</html>